package common

import "regexp"

const (
	RE_EMAIL = `\w[-\w.+]*@([A-Za-z0-9][-A-Za-z0-9]+\.)+[A-Za-z]{2,14}` // 匹配邮箱
)

func IsEmail(email string) bool {
	match, err := regexp.MatchString(RE_EMAIL, email)
	if err != nil {
		return false
	}
	return match
}
